package command;

import command.CeilingFan.CeilingFan;
import command.CeilingFan.CeilingFanOnCommand;
import command.garageDoor.GaraDoorCloseCommand;
import command.garageDoor.GarageDoor;
import command.garageDoor.GarageDoorOpenCommand;
import command.light.Light;
import command.light.LightOffCommand;
import command.light.LightOnCommand;
import command.strereo.StereoOffWithCDCommand;
import command.strereo.StereoOnWithCDCommand;
import command.strereo.Strereo;

/**
 * Created by lenovo on 2018/1/3.
 */
public class RemoteLoader {
    public static void main(String[] args){

        RemoteControl remoteControl=new RemoteControl();

        Light light=new Light("Living Room");
        Light kitchenLight=new Light("kitchen");
        CeilingFan ceilingFan=new CeilingFan("Living Room");
        GarageDoor garageDoor=new GarageDoor("");
        Strereo strereo=new Strereo("Living Room");

        LightOnCommand livingRoomLightOnCommand=new LightOnCommand(light);
        LightOffCommand livingRoomLightOffCommand=new LightOffCommand(light);

        LightOnCommand kitchenLightOn=new LightOnCommand(kitchenLight);
        LightOffCommand kitchenLightOff=new LightOffCommand(kitchenLight);

        CeilingFanOnCommand ceilingFanOnCommand=new CeilingFanOnCommand(ceilingFan);
//        CeilingFanOffCommand ceilingFanOffCommand=new CeilingFanOffCommand(ceilingFan);

        GarageDoorOpenCommand garageDoorOpenCommand=new GarageDoorOpenCommand(garageDoor);
        GaraDoorCloseCommand garaDoorCloseCommand=new GaraDoorCloseCommand(garageDoor);

        StereoOnWithCDCommand stereoOnWithCDCommand=new StereoOnWithCDCommand(strereo);
        StereoOffWithCDCommand stereoOffWithCDCommand=new StereoOffWithCDCommand(strereo);

        remoteControl.setCommand(0,livingRoomLightOnCommand,livingRoomLightOffCommand);
        remoteControl.setCommand(1,kitchenLightOn,kitchenLightOff);
//        remoteControl.setCommand(2,ceilingFanOnCommand,ceilingFanOffCommand);
        System.out.println(remoteControl);

        remoteControl.onButtonWasPushed(0);
        remoteControl.offButtonWasPushed(0);
        remoteControl.offButtonWasPushed(1);
        remoteControl.onButtonWasPushed(1);
        remoteControl.onButtonWasPushed(2);
        remoteControl.offButtonWasPushed(2);
        remoteControl.onButtonWasPushed(3);
        remoteControl.offButtonWasPushed(3)
        ;





    }
}
